﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data.Linq.Mapping;

namespace ArtOfNet.Framework.Data.Schema
{
    [Table(Name = "sys.tables")]
    public class BaseTable : ITable
    {
       [Column(Name = "name")]
        public string Name;
        [Column(Name = "object_id")]
        public int ID;
        [Column(Name = "create_date")]
        public DateTime CreationDate;
        [Column(Name = "modify_date")]
        public DateTime ModifyDate;
        [Column(Name = "is_ms_shipped")]
        public bool IsSystem;
        [Column(Name = "schema_id")]
        public int SchemaID;
        

        public override string ToString()
        {
            return Name;
        }
    }

    public class Table : BaseTable
    {
        public List<Column> Columns { get; set; }
    }
}
